package com.prs.crm.service.assets.impl;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.prs.crm.dao.assets.AssetsRegisterDao;
import com.prs.crm.domain.assets.AssetsLingYong;
import com.prs.crm.domain.assets.AssetsLiuXiang;
import com.prs.crm.domain.assets.AssetsRegister;
import com.prs.crm.domain.assets.AssetsRevert;
import com.prs.crm.domain.assets.AssetsScrap;
import com.prs.crm.service.assets.AssetsLiuXiangService;
import com.prs.crm.service.assets.AssetsRegisterService;
import com.prs.crm.service.impl.BaseServiceImpl;

public class AssetsRegisterServiceImpl extends BaseServiceImpl<AssetsRegister, AssetsRegisterDao>
			implements AssetsRegisterService{
	private AssetsLiuXiangService assetsLiuXiangService;
	public AssetsLiuXiangService getAssetsLiuXiangService() {
		return assetsLiuXiangService;
	}

	public void setAssetsLiuXiangService(AssetsLiuXiangService assetsLiuXiangService) {
		this.assetsLiuXiangService = assetsLiuXiangService;
	}

	@Override
	public List<AssetsRegister> getAll() {
		// TODO Auto-generated method stub
		return this.getDao().getAllAssetsRegister();
	}

	@Override
	public List<AssetsRegister> getAllByids(Integer[] ids) {
		List<AssetsRegister> registers = new ArrayList<AssetsRegister>();
		for(int i=0;i<ids.length;i++){
			System.out.println(ids[i]);
			if (ids[i]!=null) {
				AssetsRegister regi = this.getDao().getAllRegisterById(ids[i]);
				registers.add(regi);
			}
		}
		return registers;
	}

	@Override
	public AssetsRegister getByNum(String num) {
		// TODO Auto-generated method stub
		return this.getDao().getRegisterByNum(num);
	}

	@Override
	public List<AssetsRegister> getAssetsRegistersByLingYong(
			AssetsLingYong assetsLingYong) {
		return this.getDao().getAssetsRegistersByLingYong(assetsLingYong);
	}

	@Override
	public List<AssetsRegister> getAssetsRegistersByRevert(
			AssetsRevert assetsRevert) {
		return this.getDao().getAssetsRegistersByRevert(assetsRevert);
	}

	@Override
	public List<AssetsRegister> getAssetsRegistersByScrap(
			AssetsScrap assetsScrap) {
		return this.getDao().getAssetsRegistersByScrap(assetsScrap);
	}

}
